// class CategoryBigModel {
//   String mallCategoryId; //类别编号
//   String mallCategoryName; //类名名称
//   List<dynamic> bxMallSubDto; //小类列表
//   String image; //类别图片
//   Null comments; //列表描述

//   // 构造函数
//   CategoryBigModel({
//     this.mallCategoryId,
//     this.mallCategoryName,
//     this.bxMallSubDto,
//     this.image,
//     this.comments
//   });

//   // 工厂模式
//   factory CategoryBigModel.fromJson(dynamic json) {
//     return CategoryBigModel(
//       mallCategoryId: json['mallCategoryId'],
//       mallCategoryName: json['mallCategoryName'],
//       bxMallSubDto: json['bxMallSubDto'],
//       image: json['image'],
//       comments: json['comments']
//     );
//   }
// }

// class CategoryBigListModel {
//   List<CategoryBigModel> data;

//   CategoryBigListModel(this.data);

//   factory CategoryBigListModel.fromJson(List json) {
//     return CategoryBigListModel(
//       json.map((i)=>CategoryBigModel.fromJson(i)).toList()
//     );
//   }
// }
class CategoryBigModel {
  String mallCategoryId;
  String mallCategoryName;
  List<BxMallSubDto> bxMallSubDto;
  Null comments;
  String image;

  CategoryBigModel(
      {this.mallCategoryId,
      this.mallCategoryName,
      this.bxMallSubDto,
      this.comments,
      this.image});

  CategoryBigModel.fromJson(Map<String, dynamic> json) {
    mallCategoryId = json['mallCategoryId'];
    mallCategoryName = json['mallCategoryName'];
    if (json['bxMallSubDto'] != null) {
      bxMallSubDto = new List<BxMallSubDto>();
      json['bxMallSubDto'].forEach((v) {
        bxMallSubDto.add(new BxMallSubDto.fromJson(v));
      });
    }
    comments = json['comments'];
    image = json['image'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['mallCategoryId'] = this.mallCategoryId;
    data['mallCategoryName'] = this.mallCategoryName;
    if (this.bxMallSubDto != null) {
      data['bxMallSubDto'] = this.bxMallSubDto.map((v) => v.toJson()).toList();
    }
    data['comments'] = this.comments;
    data['image'] = this.image;
    return data;
  }
}

class CategoryBigListModel {
  List<CategoryBigModel> data;

  CategoryBigListModel(this.data);

  CategoryBigListModel.fromJson(List json) {
    data = json.map((i)=>CategoryBigModel.fromJson(i)).toList();
  }
}

class BxMallSubDto {
  String mallSubId;
  String mallCategoryId;
  String mallSubName;
  String comments;

  BxMallSubDto(
      {this.mallSubId, this.mallCategoryId, this.mallSubName, this.comments});

  BxMallSubDto.fromJson(Map<String, dynamic> json) {
    mallSubId = json['mallSubId'];
    mallCategoryId = json['mallCategoryId'];
    mallSubName = json['mallSubName'];
    comments = json['comments'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['mallSubId'] = this.mallSubId;
    data['mallCategoryId'] = this.mallCategoryId;
    data['mallSubName'] = this.mallSubName;
    data['comments'] = this.comments;
    return data;
  }
}
